package com.foreknow.dao;

import com.foreknow.model.GuestBook;
import com.foreknow.util.Pagination;

import java.sql.SQLException;
import java.util.List;

public interface GuestBookDao {
    public boolean gSave(GuestBook guestBook) throws SQLException;

    public List<Object> gQuery() throws SQLException;

    public boolean gDelete(int id) throws SQLException;

    public boolean gUpdate(GuestBook guestBook,int id) throws SQLException;

    public GuestBook gQueryById(int id) throws SQLException;

    /**
     * 分页查询
     * @param pageSize 每页显示的记录数
     * @param pageNumber 当前页码
     * @return Pagination 分页的接口
     * @throws SQLException
     */
    public Pagination getGuestBookByPage(int pageSize, int pageNumber) throws SQLException;
}
